The invention is particularly but not exclusively concerned with a reference circuit for use in a voltage detection circuit for detecting the power supply for flash EPROM chips. A voltage detection circuit is needed for these chips to prevent programming or erasing of the flash memory when the normal power supply voltage Vcc is below a safe value (normally referred to as VLKO in the data sheet). This is because when the power supply voltage is below a certain value, the memory chip may not operate reliably, which could cause programming and/or erasing of random memory cells.
Flash memory chips also require a high voltage power supply Vpp of about 12 V for programming the memory, and it can be desirable to provide a detection circuit for that voltage as well.
For flash memory chips capable of operating with the power supply voltage at either 3.3 V or 5 V, it is also desirable for the voltage detection circuit to determine the power supply voltage range.
A known voltage detection circuit is shown in FIG. 1. This circuit includes a comparator 2 having a minus input 4 to which is supplied a voltage V1 derived from the power supply voltage Vcc through a resistive chain comprising resistors R1 and R2. The comparator 2 also has a plus input 6 which receives a voltage reference VREF. The comparator is operable to change the logic state of its output signal VDETECT depending on whether or not V1 exceeds VREF. If V1 is greater than VREF, VDETECT remains low. However, if V1 is less than VREF, VDETECT goes high, indicating that the power supply voltage Vcc has not yet reached its correct value.
The reference voltage and the ratio between resistors R.sub.1, R.sub.2 are set at a suitable value for comparison depending on the desired level of the power supply voltage.
A similar detection circuit can be used to detect if the operating power supply range is 3.3 V plus or minus 0.3 V or 5 V plus or minus 0.5 V. To do this, the voltage detection circuit must generate an output signal VDETECT which switches between 3.6 V and 4.5 V. In this case, the output signal VDETECT is used to reconfigure parts of the internal circuitry of a flash memory chip depending on the power supply range.
In FIG. 1, the voltage V1 derived from the power supply voltage is essentially independent of temperature or process variations, because it is obtained from a resistor divider. However, any variation in the reference voltage VREF will produce an unwanted variation in the voltage detection level. It is therefore one object of the invention to select a good reference source for the voltage reference VREF.
In addition, the reference voltage VREF is required to operate reliably during power transitions, otherwise the voltage detection circuit may fail to operate properly just when it is needed most. It is another object of the present invention to provide a voltage detection circuit which operates reliably during power transitions.